﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Personal/Personal_Master.Master" AutoEventWireup="true" CodeBehind="nhomungdung.aspx.cs" Inherits="NCKH.Personal.nhomungdung" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2 style="text-align:center">NHÓM TRIỂN KHAI ỨNG DỤNG</h2>
    <h4>Bạn ứng dụng theo nhóm hay cá nhân??</h4>
    <p style="text-align:center; font-size:large" >
        <asp:RadioButton ID="rbtnNhom" runat="server" Text="&nbsp;Nhóm"  GroupName="rbtn" OnCheckedChanged="rbtnNhom_CheckedChanged" />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
        <asp:RadioButton ID="rbtnCanhan" runat="server" Text="&nbsp;Cá nhân" GroupName="rbtn" Checked="true"/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
        <asp:Button ID="btnOK" runat="server" Text="OK" OnClick="btnOK_Click" Width="64px" />    
    </p>
    <asp:Panel ID="pnnhomud" runat="server" Visible="false">
        <h4>
            Nhóm của bạn đã thuyết minh hoặc thực hiện đề tài chưa?
            </h4>
            <asp:RadioButton ID="rbtroi" runat="server" Text="&nbsp;Đã có rồi"  GroupName="rbtn1" OnCheckedChanged="rbtroi_CheckedChanged" />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <asp:RadioButton ID="rbtchua" runat="server" Text="&nbsp;Tạo nhóm mới" GroupName="rbtn1" Checked="true"/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <asp:Button ID="btndongy" runat="server" Text="OK" OnClick="btndongy_Click" Width="64px" />            
    </asp:Panel>
    <asp:Panel ID="pnchonnhom" runat="server" Visible="false">
        Chọn tên đề tài
        <br />
        <asp:DropDownList ID="drtendetai" runat="server" OnSelectedIndexChanged="drtendetai_SelectedIndexChanged">
            <asp:ListItem> --Chọn đề tài--</asp:ListItem>
        </asp:DropDownList>
        Chọn Đơn vị
               <asp:DropDownList ID="drdonvi" runat="server">
                    <asp:ListItem>--Chọn đơn vị--</asp:ListItem>
                    </asp:DropDownList>
        <asp:Button ID="btndetai" runat="server" Text="OK" Width="60px" OnClick="btndetai_Click" />
    </asp:Panel>
    <asp:Panel ID="bnthanhviennhom" runat="server" Visible="false">
        Bạn có muốn thay đổi thành viên trong nhóm không??
          <asp:RadioButton ID="rbtco" runat="server" Text="&nbsp;Có"  GroupName="rbtn2" OnCheckedChanged="rbtco_CheckedChanged" />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
        <asp:RadioButton ID="rbtkhong" runat="server" Text="&nbsp;Không" GroupName="rbtn2" Checked="true"/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btntendetai" runat="server" Text="OK" Width="72px" OnClick="btntendetai_Click" />
    </asp:Panel>
    <asp:Panel ID="bnnhomthanhvien" runat="server" Visible="false">
        <asp:GridView ID="grvthanhviennhom" runat="server" AutoGenerateColumns="false"
             OnRowCommand="grvthanhviennhom_RowCommand" OnSelectedIndexChanged="grvthanhviennhom_SelectedIndexChanged">
            <Columns>
                <asp:BoundField HeaderText="Tên đăng nhập" DataField="Tendangnhap"/>
                  <asp:BoundField DataField="Email" HeaderText="Email" />
                <asp:TemplateField HeaderText="Xóa">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtxoa" runat="server" Text="xóa" OnClientClick='confirm("Bạn có chắc chắn muốn xóa thành viên này không?")'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:Button ID="btnthemtv" runat="server" Text="Thêm TV mới" />
    </asp:Panel>
    <asp:Panel ID="plNhom" runat="server" Visible="false" >
        <table style="width: 259px; height: 77px; margin-left:250px">
            <tr>
                <th colspan="2">Nhóm ứng dụng đề tài</th>
            </tr>
            <tr>
                <td>Tên nhóm </td>
                <td><asp:TextBox ID="txtTennhom" runat="server" Width="149px"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Đơn vị</td>
                <td><asp:DropDownList ID="ddlDonvi" runat="server">
                    <asp:ListItem>--Chọn đơn vị--</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
             <tr>
                <td>Đề tài</td>
                <td><asp:DropDownList ID="drddetai" runat="server">
                    <asp:ListItem>--Chọn đề tài--</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td></td>
                <td><asp:Button ID="btnLapnhom" runat="server" Text="Lập nhóm" Height="31px" Width="75px" OnClick="btnLapnhom_Click" /></td>
            </tr>
        </table>
    </asp:Panel><br /><br />
    <hr />
    <asp:Panel ID="plThanhvien" runat="server" Visible="false">
        <h3>Thành viên nhóm</h3>
        <asp:TextBox ID="txtTimkiem" runat="server" Text="Tìm kiếm..." Width="188px"></asp:TextBox>&nbsp;&nbsp;
        Đơn vị <asp:DropDownList ID="ddlDonviTV" runat="server">
            <asp:ListItem>--Chọn đơn vị--</asp:ListItem>
               </asp:DropDownList>&nbsp;&nbsp;
        <asp:Button ID="btnTim" runat="server" Text="Tìm tên" Height="32px" Width="74px" />
        <asp:GridView ID="grvHienDS" runat="server"
             AutoGenerateColumns="false" DataKeyNames="MaTK"
             OnRowCommand="grvHienDS_RowCommand"  OnRowDataBound="grvHienDS_RowDataBound" OnSelectedIndexChanged="grvHienDS_SelectedIndexChanged1" >
            <Columns>
                <asp:BoundField DataField="Tendangnhap" HeaderText="Tên đăng nhập"/>
                <asp:BoundField DataField="Email" HeaderText="Email" />
                <asp:TemplateField HeaderText="Vai trò">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlVaitro" runat="server">
                            <asp:ListItem>--Chọn vai trò--</asp:ListItem>
                            <asp:ListItem Value="Chunhiem" Text="Chủ nhiệm"></asp:ListItem>
                            <asp:ListItem Value="Thanhvien" Text="Thành viên"></asp:ListItem>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thêm thành viên">
                    <ItemTemplate>
                        <asp:ImageButton ID="lbntThem" runat="server" 
                            ImageUrl="~/Images/group_add.png"
                            CommandArgument='<%# Eval("MaTK") %>'
                            CommandName="them"/>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </asp:Panel>
    <asp:Label ID="lblthongbao" runat="server"></asp:Label>
</asp:Content>
